-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Command Palette: Add "Design" and "Styles" command for classic theme #69873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Command Palette: Add "Design" and "Styles" command for classic theme #69873
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
| } | ||
| } | ||
|
|
||
| result.push( { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I believe, there's a minor scope for refactoring this useMemo implementation. We can push patterns to results immediately after its declaration and bail out early if ! canCreateTemplate is true. This should remove one layer of nesting and improve overall readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @yogeshbhutkar,
Thank you for the suggestion! I’ve simplified the code and applied early return logic to improve clarity.
|
Hi |
Hi @carolinan, |
|
I think it's fine to go ahead with either this PR or #69857. If you want to move this PR forward, use this check: gutenberg/packages/edit-site/src/components/site-hub/index.js Lines 138 to 139 in 0674eab
|
Hi @t-hamano, When I try to import code:import { store as editSiteStore } from '@wordpress/edit-site';Do you think I should use a relative path to access the store? Something like:import { store as editSiteStore } from '../../edit-site/src/store';I want to access |
Sorry, I was wrong. This store does not exist outside of the site editor. We need to move #69857 forward first.
This approach is not recommended. |
|
Update: The menu commands are now automatically registered based on the Menu API (See #71476). As a result, we don't need to add the "Design" command in this PR. |

What?
This PR addresses issue by adding navigation commands for classic themes
Closes: #69854
Why?
Currently, block themes have commands to access the Site Editor and Styles, but classic themes that support StyleBook lack equivalent navigation options.
How?
The implementation adds StyleBook navigation support for classic themes with the following approach:
isSupportEditorStylesflagScreenshots or screencast
Screen.Recording.2025-04-11.at.10.52.55.AM.mov
Screen.Recording.2025-04-11.at.10.53.43.AM.mov